{
GtkFileChooserDefault *impl;
GList *items;
- gint n_items;
guint needs_sorting : 1;
} RecentLoadData;
if (load_data->needs_sorting)
{
gint limit;
+ gint n_items;
load_data->items = g_list_sort (load_data->items, recent_sort_mru);
- load_data->n_items = g_list_length (load_data->items);
+ n_items = g_list_length (load_data->items);
limit = get_recent_files_limit (GTK_WIDGET (impl));
- if (limit != -1 && (load_data->n_items > limit))
+ if (limit != -1 && (n_items > limit))
{
GList *clamp, *l;
g_list_foreach (l, (GFunc) gtk_recent_info_unref, NULL);
g_list_free (l);
-
- load_data->n_items = limit;
}
}
load_data = g_new (RecentLoadData, 1);
load_data->impl = impl;
load_data->items = NULL;
- load_data->n_items = 0;
load_data->needs_sorting = TRUE;
/* begin lazy loading the recent files into the model */